package org.liquidByte.simpleChat.server;

import java.io.IOException;

import org.liquidByte.simpleChat.communication.AbstractClient;
import org.liquidByte.simpleChat.communication.Channel;
import org.liquidByte.simpleChat.communication.CommunicationException;
import org.liquidByte.simpleChat.dto.User;
import org.liquidByte.simpleChat.dto.UserIdentification;
import org.liquidByte.simpleChat.dto.UserMessage;

class EventClient extends AbstractClient {
	public EventClient(Channel channel) {
		super(channel); 
	}
	
	public void onUserOnline(User user) throws IOException, CommunicationException {
		this.call("event/onUserOnline", user);
	}
	public void onUserOffline(UserIdentification userIdent) throws IOException, CommunicationException {
		this.call("event/onUserOffline", userIdent);
	}
	public void onStatusChanged(User user) 	throws IOException, CommunicationException {
		this.call("event/onStatusChanged", user);
	}
	public void onMessageReceived(UserMessage userMessage) throws IOException, CommunicationException {
		this.call("event/onMessageReceived", userMessage);
	}	
}
